﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Content;

namespace DARE
{
    public class CAnimationContent
    {
        #region Fields

        List<IAnimation> m_anims;

        #endregion

        #region Property

        [ContentSerializer]
        public List<IAnimation> Animations
        {
            get { return this.m_anims; }
            private set
            {
                if (m_anims != value)
                {
                    m_anims = value;
                    foreach (var elem in m_anims)
                        CAnimationMgr.AddAnimation(elem);
                }
            }
        }

        #endregion

        #region CTOR

        public CAnimationContent()
        {
            m_anims = new List<IAnimation>();
        }

        #endregion

        #region Method

        public void AddAnimation(IAnimation _anim)
        {
            m_anims.Add(_anim);
        }

        #endregion
    }
}
